//
//  RCUserAppApi.h
//  FreshMember
//
//  Created by qyc on 2019/4/19.
//  Copyright © 2019年 qyc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

// 订单枚举
typedef enum : NSUInteger {
    HAUserOrderTypeWithWaitDelivery = 1, // 待送达
    HAUserOrderTypeWithAlreadyDelivery = 2, // 已送达
} HAUserOrderType;

// 消息枚举
typedef enum : NSInteger {
    HAUserAppApiWithMessageSuccess = 200, // 成功
} HAUserAppApiWithMessage;

// 定义返回请求数据的block类型
typedef void (^UserAppApiSuccessHandler) (id successHandler);
typedef void (^UserAppApiErrorHandler) (id errorHandler);

@interface HAUserAppApi : NSObject

+ (HAUserAppApi *)sharedApi;

/**
 *  发送短息验证码
 */
- (void)requestSendSmsWithMobile:(NSString *)mobile completionHandler:(UserAppApiSuccessHandler)completionHandler errorHandler:(UserAppApiErrorHandler)errorHandler;

/**
 *  用户的登录 验证码
 */
- (void)requestUserLoginCodeWithMobile:(NSString *)mobile code:(NSString *)code completionHandler:(UserAppApiSuccessHandler)completionHandler errorHandler:(UserAppApiErrorHandler)errorHandler;

/**
 *  骑手订单
 */
- (void)requestRiderOrderListWithRider_uid:(NSString *)rider_uid types:(HAUserOrderType)types completionHandler:(UserAppApiSuccessHandler)completionHandler errorHandler:(UserAppApiErrorHandler)errorHandle;

/**
 *  骑手确认送达
 */
- (void)requestRiderUpdateOrderStatusWithOrder_status:(NSInteger)order_status order_id:(NSString *)order_id rider_uid:(NSString *)rider_uid completionHandler:(UserAppApiSuccessHandler)completionHandler errorHandler:(UserAppApiErrorHandler)errorHandler;

/**
*  获取订单状态
*/
- (void)requestRiderOrderStatusWithOrder_id:(NSString *)order_id completionHandler:(UserAppApiSuccessHandler)completionHandler errorHandler:(UserAppApiErrorHandler)errorHandler;

/**
*  扫一扫接单
*/
- (void)requestRiderScanOrderStatusWithOrder_status:(NSInteger)order_status order_id:(NSString *)order_id rider_uid:(NSString *)rider_uid completionHandler:(UserAppApiSuccessHandler)completionHandler errorHandler:(UserAppApiErrorHandler)errorHandler;
@end

NS_ASSUME_NONNULL_END
